import React from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// menu 模块
const menuRouter: Array<RouteObject> = [
	{
		element: <LayoutIndex />,
		path: "/platform",
		permissions: [
			"platformView",
			"discountPage",
			"configListPage",
			"relationPlatformPage",
			"gameView",
			"accountTagPage",
		],
		meta: {
			title: "管理设置",
			icon: "MenuOutlined",
			sort: 8,
		},
		children: [
			{
				path: "/platform/menu1",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu1/index"))),
				meta: {
					requiresAuth: true,
					icon: "MenuOutlined",
					title: "游戏字典",
					key: "gameView"
				}
			},
			{
				path: "/platform/menu2",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu21/index"))),
				meta: {
					requiresAuth: true,
					icon: "MenuOutlined",
					title: "商户管理",
					key: "platformView"
				}
			},
			{
				path: "/platform/menu3",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu22/menu221/index"))),
				meta: {
					requiresAuth: true,
					icon: "MenuOutlined",
					title: "选号网配置",
					key: "discountPage"
				}
			},
			{
				path: "/platform/menu4",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu22/menu221/index"))),
				meta: {
					requiresAuth: true,
					icon: "MenuOutlined",
					title: "配置列表",
					key: "configListPage"
				}
			},
			{
				path: "/platform/menu5",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu22/menu221/index"))),
				meta: {
					requiresAuth: true,
					icon: "MenuOutlined",
					title: "账号标签列表",
					key: "accountTagPage"
				}
			},
		]
	}
];

export default menuRouter;
